﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class ProgressBar : MonoBehaviour
{
	float TotalSeconds;
	public AudioSource audioSource;
	void Start()
	{
		TotalSeconds = audioSource.clip.length;
		GetComponent<Slider>().value = 0;
	}
	void FixedUpdate()
	{
		float tempTime = Time.timeSinceLevelLoad;
		GetComponent<Slider>().value = tempTime / TotalSeconds;
	}
}
